projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
786d89c
)
switch: Fix int/double comparison
author
Timm Bäder
<mail@baedert.org>
Thu, 5 Oct 2017 08:16:18 +0000
(10:16 +0200)
committer
Timm Bäder
<mail@baedert.org>
Thu, 5 Oct 2017 08:21:54 +0000
(10:21 +0200)
We get a double coordinate.
gtk/gtkswitch.c
patch
|
blob
|
history
diff --git
a/gtk/gtkswitch.c
b/gtk/gtkswitch.c
index 91fc344ddb00246575fa33e96faaff024879fbb1..659e9edb80345fe5a3ae6ca8d9e4559bbde4994f 100644
(file)
--- a/
gtk/gtkswitch.c
+++ b/
gtk/gtkswitch.c
@@
-192,8
+192,8
@@
gtk_switch_multipress_gesture_pressed (GtkGestureMultiPress *gesture,
/* If the press didn't happen in the draggable handle,
* cancel the pan gesture right away
*/
- if ((priv->is_active && x <= allocation.width / 2) ||
- (!priv->is_active && x > allocation.width / 2))
+ if ((priv->is_active && x <= allocation.width / 2
.0
) ||
+ (!priv->is_active && x > allocation.width / 2
.0
))
gtk_gesture_set_state (priv->pan_gesture, GTK_EVENT_SEQUENCE_DENIED);
}